package com.douhao.personal.service;

import com.douhao.personal.model.Permission;
import com.douhao.personal.model.RolePermissionBo;
import com.douhao.personal.util.Page;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PermissionService {

    //根据用户ID查询权限（permission），放入到Authorization里。
    Set<String> findPermissionByUserId(String userId);

    Page<Permission> pageList(Permission permission, int pageNo, int pageSize);

    int deleteByPrimaryKey(Long id);

    Map<String, Object> deletePermissionById(String ids);

    int insert(Permission permission);

    Page<RolePermissionBo> findRoleAndPermission(RolePermissionBo rolePermissionBo, int pageNo, int pageSize);

    List<RolePermissionBo> selectPermissionByRoleId(String id);

    Map<String,Object> addPermission2Role(String roleId, String ids);
}
